// 表格详情- 增、修、查
import router from '@/router'
import {
    Message,
    MessageBox
} from 'element-ui'
import request from '@/util/request'
import store from '@/store'
/**
   表格数据
    type =0 为输入框  1为下拉框 2为 起止时间选择 3.一列的时间的 4多行文本框
    url 下拉框请求数据的接口地址
    required  为true 为必填
    parameter 请求的参数
    callBack 回调的方法
**/
const fieldList = [
    {
        label: '客户订单号',
        prop: 'ownerOrderCode',
        type: 0,
        required: true
    }, {
        label: '状态',
        prop: 'statusName',
        type: 1,
        required: true,
        url: '/omsService/oms/commom/data/status'
    }, {
        label: '货主',
        prop: 'ownerName',
        type: 1,
        required: true,
        parameter: {
            companyCode: localStorage.companyCode
        },
        url: '/omsService/oms/commom/data/ownerName',
        callBack(e) {
            store.state.ownerCode = e
        }
    }, {
        label: '订单类型',
        prop: 'deliveryOrderTypeName',
        type: 1,
        required: true,
        url: '/omsService/oms/commom/data/orderType'
    }, {
        label: '运输方式',
        prop: 'transportMethod',
        type: 1,
        required: true,
        url: '/omsService/oms/commom/data/transportMethod'
    }, {
        label: '下单时间',
        prop: 'createTime',
        type: 3,
        required: true
    }, {
        label: '计划发货日期',
        prop: 'orderTime',
        type: 3,
        required: true
    }, {
        label: '计划收货日期',
        prop: 'updateTime',
        type: 3,
        required: true
    }, {
        label: '发货方',
        prop: 'sender',
        type: 1,
        required: true,
        parameter: {
            SecondLevel: true
        },
        url: '/omsService/oms/commom/data/ownerAddress'
    }, {
        label: '发货地址',
        prop: 'sendAddress',
        type: 0,
        required: true
    }, {
        label: '发货联系人',
        prop: 'sendContact',
        type: 0,
        required: true
    }, {
        label: '发货联系电话',
        prop: 'sendTel',
        type: 0,
        required: true
    }, {
        label: '收货方',
        prop: 'receiver',
        type: 1,
        url: '/omsService/oms/commom/data/ownerAddress',
        parameter: {
            SecondLevel: true
        },
        required: true
    }, {
        label: '收货地址',
        prop: 'receiveAddress',
        type: 0,
        required: true
    }, {
        label: '收货联系人',
        prop: 'receiveContact',
        type: 0,
        required: true
    }, {
        label: '收货联系电话',
        prop: 'receiveTel',
        type: 0,
        required: true
    }, {
        label: '备注',
        prop: 'remark',
        type: 4,
        required: true
    }
]
const ListDetails = [
    {
        label: 'SKU',
        prop: 'skuCode',
        type: 0
    },
    {
        label: '商品名称',
        prop: 'productName',
        type: 0
    }, {
        label: '商品规格',
        prop: 'productSpec',
        type: 0
    }, {
        label: '批次号',
        prop: 'batchNo',
        type: 0
    }, {
        label: '数量',
        prop: 'qty',
        type: 5
    }, {
        label: '重量',
        prop: 'weight',
        type: 5
    }, {
        label: 'unit',
        prop: '计量单位',
        type: 0
    }
]
const urlLIst = {
    addUrl: '/omsService/oms/order/deliveryOrder/add' // 添加的接口
}
export {
    fieldList,
    ListDetails,
    urlLIst
}
